<%@ page language="java" import="java.util.*,net.skyedu.bean.*,net.skyedu.dao.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<HTML>
<HEAD>
	<base href="<%=basePath %>">
	<META http-equiv=Content-Type content="text/html; charset=UTF-8">
	<link href="<%=basePath %>attend/frame/images/skin.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath %>attend/css/show.css">
	<script language="javascript" type="text/javascript" src="<%=basePath %>attend/js/jquery-1.4.2.min.js"></script>
</HEAD>

<body>
<%
	int userId=Integer.parseInt(request.getParameter("userID"));
	UserInfoDao ud=new UserInfoDao();
	UserInfo user=ud.getSSN(userId);
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="<%=basePath %>attend/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="<%=basePath %>attend/frame/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">用户更新</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="<%=basePath %>attend/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="<%=basePath %>attend/frame/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    	<form action="UPUSERS.jsp" name="upusers"  method="post"  onSubmit="return checkForm()">
   	    <table summary="Employee" class="datatable" align="center">
		    <caption>Update Employee</caption>
		    <tr>
			    <td width="14%" height="30" scope="col"><strong>姓  名</strong></td>
			    <td><input name="name" type="text" value="<%=user.getName() %>" size="20" maxlength="20"></td>
	            <td width="14%" height="30" scope="col"><strong>性  别</strong></td>
			    <td><select name="schId" style="width:70px;" title="点击选择性别！">
<%--			    有问题？？--%>
<%--			    <option value="" <%if(user.getGender().equals("".trim())){ %>selected<%} %>>请选择</option>--%>
<%--			    	<option value="男" <%if(user.getGender().equals("男")){ %>selected<%} %>>男</option>--%>
<%--			    	<option value="女" <%if(user.getGender().equals("女")){ %>selected<%} %>>女</option>--%>
            </select></td>
		    </tr>
		    <tr>
		    <td width="14%" height="30" scope="col"><strong>校  区</strong></td>
		    <td><select name="schId" style="width:120px" title="点击选择校区！">
		    <option value="1" <%if(user.getPostId()==1){ %>selected<%} %>>请选择</option>
	            <%
	              List<Departments> schli=ud.getAllSch();
	              for(int i = 0;i < schli.size();i++){
	            	  Departments sch=schli.get(i);
	            %>
	           		<option value="<%=sch.getDeptId() %>" <%if(user.getDefaultDeptId()==sch.getDeptId()){ %>selected<%} %>><%=sch.getDeptName() %></option>
	            <%} %>
            </select></td>
            <td width="14%" height="30" scope="col"><strong>部  门</strong></td>
		    <td><select name="postId" style="width:110px" title="点击选择部门！">
		    <option value="0" selected>请选择</option>
            </select></td>
		    </tr>
            <tr>
		    <th width="14%" height="30" scope="col" colspan="4" style="text-align: center;"><input name="submit" type="submit" value="修改">&nbsp;&nbsp;<input name="submit" type="reset" value="重置">&nbsp;&nbsp;<a href="ShowUser?sta=1">返回</a></th>
		    </tr>
		 </table></form>
	</td>
    <td background="<%=basePath %>attend/frame/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="<%=basePath %>attend/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="<%=basePath %>attend/frame/images/buttom_bgs.gif"><img src="<%=basePath %>attend/frame/images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="<%=basePath %>attend/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
</HTML>